package com.jml.start;

import com.jml.service.JmlGatewayService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;


@Component
@Slf4j
public class JmlApplicationEventPublisherAware implements ApplicationRunner {

    @Autowired
    private JmlGatewayService jmlGatewayService;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        log.info("<开始初始化网关配置>");
        jmlGatewayService.init();
        log.info("<结束初始化网关配置>");
    }

}
